import unittest


class Demo1TestCase(unittest.TestCase):
    def test1(self):
        print("test1")

    def test2(self):
        print("test2")


class Demo2TestCase(unittest.TestCase):
    def testa(self):
        print("testa")

    def testb(self):
        print("testb")
if __name__ == '__main__':
    #测试套件
    sutest = unittest.TestSuite()
    # 套件组合
    tests = [
        Demo1TestCase('test1'),
        Demo2TestCase('testb')
        ]
    sutest.addTests(tests)
    #执行器
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(sutest)
